<?php
namespace app\common\model;

use think\Model;

class RelationStudentModel extends Model
{
	protected $field = true;
	public function appuser(){
		return $this->belongsTo('AppUserModel','user_id','id');
	}
	public function getLevelAttr($value){
		$data = ['组员','组长'];
		return [
				'source'=>$value,
				'data'=>$data[$value],
			];
	}
}